import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import config from './config'
const { port } = config
import path from 'path'

// https://vite.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    vueJsx()
  ],
  server: {
    host: '0.0.0.0',
    port
  },
  css: {
    preprocessorOptions: {
      less: {
        modifyVars: {
          // 'arcoblue-6': '#ff0000'
        },
        javascriptEnabled: true,
      }
    }
  },
  resolve: {
    alias: {
      '@src': path.resolve(__dirname, './src')
    },
    extensions: ['.js', '.ts', '.vue', '.jsx', 'tsx']
  }
})
